package per.qiao.simplechian.samples.normal;

import per.qiao.simplechian.bo.NodeParam;
import per.qiao.simplechian.bo.NodeResult;
import per.qiao.simplechian.core.DefaultNode;

/**
 * @author: qiaoyp
 * @Date: 2024/8/21 20:18
 * @Description:
 */
public class Node2 extends DefaultNode {

    @Override
    protected NodeResult doExec(NodeParam param, NodeResult preRtn) {

        Integer num = (Integer) preRtn.getResult();
        num -= 5;
        preRtn.setResult(num);

        param.setExtVal("name", "hello world");

        System.out.println("Node2 is running");

        return preRtn;
    }
}
